package com.xh.bgc.services;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xh.bgc.dao.UserInfoMapper;
import com.xh.bgc.pojo.UserInfo;
import com.xh.bgc.util.Mg5Test;

@Service
public class UserInfoServicesImpl implements UserInfoServices{
	@Autowired
	private UserInfoMapper mapper;
	
	@Override
	public UserInfo userLogin(String phone, String password) {
		Map<String,Object> map = new HashMap<String, Object>();
		map.put("password", Mg5Test.getMD5(password));
		map.put("phone", phone);
		
		return mapper.userLogin(map);
	}

	@Override
	public int userRegister(UserInfo userInfo) {
		
		return mapper.userRegister(userInfo);
	}

}
